package com.mk.settlement.enums;

import java.util.Arrays;
import java.util.List;

public enum DefaultRelationEnums {

    HOTEL("hotel", Arrays.asList(1)), OTA("ota", Arrays.asList(2));
    
    private String mark;
    
    private List<Integer> ruleId;

    
    public String getMark() {
        return mark;
    }

    public void setMark(String mark) {
        this.mark = mark;
    }

    public List<Integer> getRuleId() {
        return ruleId;
    }

    public void setRuleId(List<Integer> ruleId) {
        this.ruleId = ruleId;
    }

    private DefaultRelationEnums(String mark, List<Integer> ruleId) {
        this.mark = mark;
        this.ruleId = ruleId;
    }

    public static List<Integer> getDefaultRuleId(String mark) {
        
        for(DefaultRelationEnums e : values()){
            
            if(e.mark.equals(mark)) {
                
                return e.ruleId;
            }
        }
        
        return null;
    }
}
